#include<stdio.h>
int main(void){
  int n,i,high,weight;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d",&high,&weight);
    if((high-100)*1.8-weight<(high-100)*1.8*0.1&&(high-100)*1.8-weight>-(high-100)*1.8*0.1){
      printf("You are wan mei!\n");
    }
    if((high-100)*1.8-weight>=(high-100)*1.8*0.1){
       printf("You are tai shou le!\n");
    }
    if(weight-(high-100)*1.8>=(high-100)*1.8*0.1){
       printf("You are tai pang le!\n");
    }
  }
  return 0;
}
